//我们希望这个类只能有唯一的实例
class Singleton{
    private static Singleton intance=new Singleton();
    public static Singleton getIntance(){
        return intance;
    }
    private Singleton(){

    }
}
public class Test10 {
    public static void main(String[] args) {
        Singleton s1=Singleton.getIntance();
        Singleton s2=Singleton.getIntance();
        System.out.println(s1==s2);
    }
}
